<script src="/ckeditor/ckeditor.js"></script>
.head แก้ไขบล็อก
%p
.activity_form{:style=>'border:1px solid pink;color:#2175BC'}
  - form_for( :blog, :url => { :action => 'update'}, :html => { :multipart => true } ) do |f|
    = f.hidden_field :id
    %table{:align=>'center'}
      %tr
        %th ชื่อ
        %td
          = current_user.full_name
      %tr
        %th แนะนำตัว
        %td= f.text_area :profile, :size=>'40x10'
      %tr
        %th
          ภาพถ่าย
          - if @blog.blog_photo.exists?
            %br
            = link_to "ลบ", {:action=>:delete_photo, :id=>@blog.id}, :confirm=>"ยืนยัน"
        %td
          - if @blog.blog_photo.exists?
            = image_tag @blog.blog_photo.url
            %br
          = f.file_field :blog_photo
      %tr
        %td{:colspan=>'2', :align=>'center', :height=>'40'}
          = submit_tag "แก้ไขบล็อก"
%script
  $('blog_profile').focus();
<script>CKEDITOR.replace('blog_profile');</script>